package com.augurit.common.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 业务字典项Entity类，与业务字典类型关联
 *
 */
@Entity
@Table(name = "SYS_CODE_ITEM")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SysCodeItem {

	//属性
	private Long id;			//主键
	private String typeCode;	//业务字典类型编号
	private String code;		//业务字典项编号
	private String name;		//业务字典项名称
	private Integer status;		//业务字典项状态，0表示禁用，1表示启用
	private Integer sortno;		//排序字段，0-999
	private String memo;		//业务字典项备注

	
	@Id
    @SequenceGenerator(name="SEQ_SYS_CODE_ITEM", sequenceName="SEQ_SYS_CODE_ITEM", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_SYS_CODE_ITEM")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTypeCode() {
		return typeCode;
	}

	public void setTypeCode(String typeCode) {
		this.typeCode = typeCode;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getSortno() {
		return sortno;
	}

	public void setSortno(Integer sortno) {
		this.sortno = sortno;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}